#include <iostream>
#include <string>

class Solution
{
public:
    int main()
    {
        std::string numStr;
        std::cin >> numStr;
        for (auto it = numStr.crbegin(); it != numStr.crend(); ++it)
        {
            std::cout << *it;
        }
        return 0;
    }
};

#ifndef __LOCAL_TEST__
int main()
{
    return Solution().main();
}
#endif